package bitwiseOperation;

//https://leetcode.cn/problems/missing-number/
public class l_268 {
    public int missingNumber(int[] nums) {
        int ans = 0;
        for(int i = 1; i <= nums.length; i ++) ans ^= i;
        for(int x: nums) ans ^= x;
        return ans;
    }
}
